<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>出国信息管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {

        });
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    </script>
    <!-- 去除 form:select 下拉框重复项 -->
    <script type="text/javascript">
        $(function () {
            $("select").each(function (i, n) {
                var options = "";
                $(n).find("option").each(function (j, m) {
                    if (options.indexOf($(m)[0].outerHTML) == -1) {
                        options += $(m)[0].outerHTML;
                    }
                });
                $(n).html(options);
            });
        });
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/campusinfoeducation/campusinfoAbroad/">出国信息列表</a></li>
    <shiro:hasPermission name="campusinfoeducation:campusinfoAbroad:edit">
        <li><a href="${ctx}/campusinfoeducation/campusinfoAbroad/form">出国信息添加</a></li>
    </shiro:hasPermission>
</ul>
<form:form id="searchForm" modelAttribute="campusinfoAbroad" action="${ctx}/campusinfoeducation/campusinfoAbroad/"
           method="post" class="breadcrumb form-search">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
    <ul class="ul-form">
        <li><label>地区名称：</label>
            <form:select path="regionid" class="input-medium">
                <form:option value="" label="===请选择==="/>
                <form:options items="${campusinfoAbroads}" itemLabel="region" itemValue="regionid" htmlEscape="false"/>
            </form:select>
        </li>
        <li><label>国家名称：</label>
            <form:select path="countryid" class="input-medium">
                <form:option value="" label="===请选择==="/>
                <form:options items="${campusinfoAbroads}" itemLabel="country" itemValue="countryid"
                              htmlEscape="false"/>
            </form:select>
        </li>
        <li><label>支付方式：</label>
            <form:input path="paymentMethod" htmlEscape="false" maxlength="64" class="input-medium"/>
        </li>
        <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
        <li class="clearfix"></li>
    </ul>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>地区名称</th>
        <th>国家名称</th>
        <th>金额</th>
        <th>支付方式</th>
        <th>缴费地点</th>
        <th>归属用户</th>
        <th>备注信息</th>
        <shiro:hasPermission name="campusinfoeducation:campusinfoAbroad:edit">
            <th>操作</th>
        </shiro:hasPermission>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${page.list}" var="campusinfoAbroad">
        <tr>
            <td>
                    ${campusinfoAbroad.region}
            </td>
            <td>
                    ${campusinfoAbroad.country}
            </td>
            <td>
                    ${campusinfoAbroad.payment}
            </td>
            <td>
                    ${campusinfoAbroad.paymentMethod}
            </td>
            <td>
                    ${campusinfoAbroad.paymentPlace}
            </td>
            <td>
                    ${campusinfoAbroad.user.name}
            </td>
            <td>
                    ${campusinfoAbroad.remarks}
            </td>
            <shiro:hasPermission name="campusinfoeducation:campusinfoAbroad:edit">
                <td>
                    <a href="${ctx}/campusinfoeducation/campusinfoAbroad/form?id=${campusinfoAbroad.id}">修改</a>
                    <a href="${ctx}/campusinfoeducation/campusinfoAbroad/delete?id=${campusinfoAbroad.id}"
                       onclick="return confirmx('确认要删除该出国信息吗？', this.href)">删除</a>
                </td>
            </shiro:hasPermission>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>